SET CGO_ENABLED=0
SET GOOS=linux
SET GOARCH=amd64

set GO111MODULE=auto
go env GO111MODULE

go build .

ssh -i id_rsa caiyu@192.168.0.11 "cd /home/caiyu/server/api/bin/ && (killall userapi || true)"

scp -i id_rsa background caiyu@192.168.0.11:/home/caiyu/server/api/bin/userapi
scp -i id_rsa test.yaml caiyu@192.168.0.11:/home/caiyu/server/api/bin/user.yaml

scp -i ./id_rsa pem/ca.pem caiyu@192.168.0.11:/home/caiyu/server/api/pem/ca.pem
scp -i ./id_rsa pem/client-cert.pem caiyu@192.168.0.11:/home/caiyu/server/api/pem/client-cert.pem
scp -i ./id_rsa pem/client-key.pem caiyu@192.168.0.11:/home/caiyu/server/api/pem/client-key.pem

ssh -i id_rsa caiyu@192.168.0.11 "cd /home/caiyu/server/api/bin/ && nohup ./userapi > /dev/null 2>&1 &"
